Scripting languages are programming languages that are interpreted at runtime rather than being precompiled as in compiled programming languages. For example, there are several conventional scripting languages for Java® technology environments, for example the Java® Runtime Environment (JRE®) in Java® Virtual Machine (JVM®) technology. Some examples of scripting languages for Java® technology (e.g., JVM®) environments include Groovy, Jruby, Scala, Fantom, and Jython (Python for JVM®). When executing scripts in a scripting language, there is often a need to bind markup language structures (e.g., Extensible Markup Language (XML) schema structures) to the programming language (e.g., the Java® programming language). Scripting languages may be used to develop scripting applications or scripting modules within applications.
While there are many conventional data binding frameworks for binding Extensible Markup Language (XML) structures to the Java® language (JiBX, Castor XML, JBind, XMLBeans and Java Architecture for XML Binding (JAXB®), among others), JAXB is generally considered the de facto Java® technology for binding XML structures to Java® classes. Generally, these conventional data binding frameworks operate by generating Java® classes from XML schema structures; the Java® classes are then compiled to generate Java® types that represents the schema structures. Typically, using these conventional data binding frameworks, Java® classes are generated for all the XML schema structures in a set of XML Schema Definition (XSD) files, even for XML schema structures that are not used in the code that is being compiled or script that is being interpreted. For example, in scripting languages, the XML schema structures needed by a script to be executed would generally be precompiled along with all other XML schema structures defined in a set of XSD files using a data binding framework (e.g., JAXB) prior to executing the script. This need to precompile the XML schema prior to executing a script may be an issue, particularly in design and development environments where the XML schema structures and the scripts may frequently be modified. Recompiling the entire XML schema every time the developer modifies the XML schema or the script can be very time consuming.
In addition, these data binding frameworks do not allow the manipulation of parsed Document Object Model (DOM) structures. For example, JAXB builds the object structure by parsing XML. JAXB does not transform directly from a DOM structure to the JAXB model, and thus cannot build the object tree directly from a parsed DOM structure. If a DOM structure is available, the DOM structure must be serialized (or marshaled) to generate XML, and then the XML is deserialized (or unmarshaled) to the JAXB model. This need for serialization and deserialization can also be very time consuming, especially in projects with large XML schemas.
Java, JRE, JVM, and JAXB are trademarks or registered trademarks of Oracle, Inc. and/or its affiliates in the United States and other countries.